There is an issue, where the $FILE size is set to zero bytes when a signature is attached to a mime mail.
I have tested so far and found that this happens, when the getMimeEntity is acalled and the document is saved after the signature has been added to the document.
I suspect that this only happens to the in memory representation of the document ( all actions on the document are taken BEFORE the doc is created in mail.box )
I do not have any clue, how to fix this.
The current solution is to stop execution of the agent, when the doc includes attachments; the effect, of course is that no signature is added to those docs.
If anyone has any idea, pls. let me know .